/**
 * 资产管理路由管理
 */

import Layout from '@/layout'

const assetmanage = {
  path: '/assetmanage',
  component: Layout,
  meta: { title: '资产管理', icon: 'caigou1', noCache: true, roles: ['dfAdmin','dfZongjian'] },
  children: [
    {
      path: '/fenlei',
      component: () => import('@/views/assetmanage/fenlei/fenlei'),
      name: 'fenlei',
      meta: { title: '资产分类', noCache: true, roles: ['dfAdmin','dfZongjian'] }
    },
    {
      path: '/ruku',
      component: () => import('@/views/assetmanage/ruku/ruku'),
      name: 'Ruku',
      meta: { title: '仓库资产', noCache: true, roles: ['dfAdmin','dfZongjian'] }
    },
    {
      path: '/addruku',
      component: () => import('@/views/assetmanage/ruku/addruku'),
      name: 'Addruku',
      meta: { title: '编辑仓库资产', noCache: true, roles: ['dfAdmin','dfZongjian'],activeMenu:'/ruku' },
      hidden: true
    },
    // {
    //   path: '/zifenlei',
    //   component: () => import('@/views/assetmanage/zifenlei/fenlei'),
    //   name: 'zifenlei',
    //   meta: { title: '子设备分类', noCache: true, roles: ['dfAdmin','dfZongjian'] }
    // },
    {
      path: '/zishebei',
      component: () => import('@/views/assetmanage/zishebei/index'),
      name: 'Zishebei',
      meta: { title: '子设备', noCache: true, roles: ['dfAdmin','dfZongjian'],activeMenu:'/ruku' },
      hidden: true
    },
    {
      path: '/writezishebei',
      component: () => import('@/views/assetmanage/zishebei/writezishebei'),
      name: 'Writezishebei',
      meta: { title: '编辑子设备', noCache: true, roles: ['dfAdmin','dfZongjian'],activeMenu:'/ruku' },
      hidden: true
    },
    {
      path: '/updata',
      component: () => import('@/views/assetmanage/ruku/updata'),
      name: 'Rukuupdata',
      meta: { title: '更改入库单', activeMenu:'/ruku', noCache: true, roles: ['dfAdmin','dfZongjian'] },
      hidden: true
    },
    {
      path: '/xiangqing',
      component: () => import('@/views/assetmanage/ruku/xiangqing'),
      name: 'Rukuxiangqing',
      meta: { title: '入库详情', activeMenu:'/ruku', noCache: true, roles: ['dfAdmin','dfZongjian'] },
      hidden: true
    },
    {
      path: '/lingyongtuiku',
      component: () => import('@/views/assetmanage/lingyongtuiku/lingyong'),
      name: 'Lingyongtuiku',
      meta: { title: '领用&退库', roles: ['dfAdmin','dfZongjian'] }
    },
    
    {
      path: '/addlingyong',
      component: () => import('@/views/assetmanage/lingyongtuiku/addlingyong'),
      name: 'Addlingyong',
      meta: { title: '编辑领用单', roles: ['dfAdmin','dfChejian','dfZongjian'] },
      hidden: true
    },
    {
      path: '/lingxiangqing',
      component: () => import('@/views/assetmanage/lingyongtuiku/lingxiangqing'),
      name: 'Lingxiangqing',
      meta: { title: '领用详情', activeMenu:'/lingyongtuiku', noCache: true, roles: ['dfAdmin','dfZongjian'] },
      hidden: true
    },
    
    {
      path: '/tuixiangqing',
      component: () => import('@/views/assetmanage/lingyongtuiku/tuixiangqing'),
      name: 'Tuixiangqing',
      meta: { title: '退库详情', activeMenu:'/lingyongtuiku', noCache: true, roles: ['dfAdmin','dfZongjian'] },
      hidden: true
    },
    
    
    {
      path: '/addtuiku',
      component: () => import('@/views/assetmanage/lingyongtuiku/addtuiku'),
      name: 'Addtuiku',
      meta: { title: '编辑退库单', noCache: true, roles: ['dfAdmin','dfChejian','dfZongjian'] },
      hidden: true
    },
    
    {
      path: '/jieyongguihuan',
      component: () => import('@/views/assetmanage/jieyongguihuan/index'),
      name: 'Jieyongguihuan',
      meta: { title: '借用&归还', noCache: true, roles: ['dfAdmin','dfZongjian'] }
     
    },
    
    {
      path: '/addjieyong',
      component: () => import('@/views/assetmanage/jieyongguihuan/addjieyong'),
      name: 'Addjieyong',
      meta: { title: '编辑借用单', activeMenu:'/jieyongguihuan', noCache: true, roles: ['dfAdmin','dfZongjian'] },
      hidden: true
    },
    
    {
      path: '/jiexiangqing',
      component: () => import('@/views/assetmanage/jieyongguihuan/jiexiangqing'),
      name: 'Jiexiangqing',
      meta: { title: '借用单详情', activeMenu:'/jieyongguihuan', noCache: true, roles: ['dfAdmin','dfZongjian'] },
      hidden: true
    },
    {
      path: '/zichanmingxi',
      component: () => import('@/views/assetmanage/zichanmingxi/index'),
      name: 'Zichanmingxi',
      meta: { title: '资产明细', noCache: true, roles: ['dfAdmin','dfZongjian'] },
      hidden: true
    },
    {
      path: '/diaobo',
      component: () => import('@/views/assetmanage/diaobo/index'),
      name: 'Diaobo',
      meta: { title: '资产调拨', noCache: true, roles: ['dfAdmin','dfZongjian'] }
    },
    {
      path: '/writediaobo',
      component: () => import('@/views/assetmanage/diaobo/writediaobo'),
      name: 'Writediaobo',
      meta: { title: '编辑资产调拨', noCache: true, roles: ['dfAdmin','dfZongjian'], activeMenu: '/diaobo' },
      hidden: true
    },
    // {
    //   path: '/pandian',
    //   component: () => import('@/views/assetmanage/pandian/index'),
    //   name: 'Pandian',
    //   meta: { title: '盘点管理', noCache: true, roles: ['dfAdmin','dfZongjian'] }
    // },
    {
      path: '/writepandian',
      component: () => import('@/views/assetmanage/pandian/writepandian'),
      name: 'Writepandian',
      meta: { title: '编辑盘点管理', noCache: true, roles: ['dfAdmin','dfZongjian'], activeMenu: '/pandian' },
      hidden: true
    },
    {
      path: '/baofei',
      component: () => import('@/views/assetmanage/baofei/index'),
      name: 'Baofei',
      meta: { title: '清理报废', noCache: true, roles: ['dfAdmin','dfZongjian'] }
    },
    {
      path: '/writebaofei',
      component: () => import('@/views/assetmanage/baofei/writebaofei'),
      name: 'Writebaofei',
      meta: { title: '编辑清理报废', noCache: true, roles: ['dfAdmin','dfZongjian'], activeMenu: '/baofei'  },
      hidden: true
    },
    {
      path: '/weixiu',
      component: () => import('@/views/assetmanage/weixiu/index'),
      name: 'Weixiu',
      meta: { title: '维修信息登记', noCache: true, roles: ['dfAdmin','dfZongjian'] }
    },
    {
      path: '/writeweixiu',
      component: () => import('@/views/assetmanage/weixiu/writeweixiu'),
      name: 'Writeweixiu',
      meta: { title: '编辑维修信息', noCache: true, roles: ['dfAdmin','dfZongjian'], activeMenu: '/weixiu' },
      hidden: true
    },
    // {
    //   path: '/caiwu',
    //   component: () => import('@/views/assetmanage/caiwu/index'),
    //   name: 'Caiwu',
    //   meta: { title: '财务信息变更', noCache: true, roles: ['dfAdmin','dfZongjian'] }
    // },
    // {
    //   path: '/writecaiwu',
    //   component: () => import('@/views/assetmanage/caiwu/writecaiwu'),
    //   name: 'Writecaiwu',
    //   meta: { title: '编辑财务信息变更', noCache: true, roles: ['dfAdmin','dfZongjian'], activeMenu: '/caiwu' },
    //   hidden: true
    // },
    {
      path: '/weibao',
      component: () => import('@/views/assetmanage/weibao/index'),
      name: 'Weibao',
      meta: { title: '维保信息变更', noCache: true, roles: ['dfAdmin','dfZongjian'] }
    },
    {
      path: '/writeweibao',
      component: () => import('@/views/assetmanage/weibao/writeweibao'),
      name: 'Writeweibao',
      meta: { title: '编辑维保信息变更', noCache: true, roles: ['dfAdmin','dfZongjian'], activeMenu: '/weibao' },
      hidden: true
    },
    // {
    //   path: '/shiwu',
    //   component: () => import('@/views/assetmanage/shiwu/index'),
    //   name: 'Shiwu',
    //   meta: { title: '实物信息变更', noCache: true, roles: ['dfAdmin','dfZongjian'] }
    // },
    // {
    //   path: '/writeshiwu',
    //   component: () => import('@/views/assetmanage/shiwu/writeshiwu'),
    //   name: 'Writeshiwu',
    //   meta: { title: '编辑实物信息变更', noCache: true, roles: ['dfAdmin','dfZongjian'], activeMenu: '/shiwu' },
    //   hidden: true
    // },
    {
      path: '/waitjianxiu',
      component: () => import('@/views/assetmanage/waitjianxiu/index'),
      name: 'Waitjianxiu',
      meta: { title: '等待保养', roles: ['dfAdmin','dfZongjian'] }
    },
    {
      path: '/seting',
      component: () => import('@/views/assetmanage/seting/index'),
      name: 'Seting',
      meta: { title: '系统设置', noCache: true, roles: ['dfAdmin','dfZongjian'] }
    },
    {
      path: 'consumables',
      alwaysShow: true,
      component: () => import('@/views/consumables/index'),
      name: 'Consumables',
      meta: { title: '耗材管理', noCache: true, roles: ['dfAdmin','dfZongjian'] },
      children: [
        {
          path: '/haocailingtui',
          component: () => import('@/views/consumables/haocailingtui/index'),
          name: 'Haocailingtui',
          meta: { title: '领用&退库', noCache: true, roles: ['dfAdmin','dfZongjian'] }
        },
        {
          path: '/writehaocailing',
          component: () => import('@/views/consumables/haocailingtui/writehaocailing'),
          name: 'Writehaocailing',
          meta: { title: '编辑耗材领用', noCache: true, roles: ['dfAdmin','dfZongjian'],activeMenu:'/haocailingtui' },
          hidden: true
        },
        {
          path: '/writehaocaitui',
          component: () => import('@/views/consumables/haocailingtui/writehaocaitui'),
          name: 'Writehaocaitui',
          meta: { title: '编辑耗材退库', noCache: true, roles: ['dfAdmin','dfZongjian'],activeMenu:'/haocailingtui' },
          hidden: true
        },
        {
          path: '/rukudan',
          component: () => import('@/views/consumables/rukudan/index'),
          name: 'Rukudan',
          meta: { title: '入库单', noCache: true, roles: ['dfAdmin','dfZongjian'] },
          hidden: true
        },
        {
          path: '/writerukudan',
          component: () => import('@/views/consumables/rukudan/writerukudan'),
          name: 'Writerukudan',
          meta: { title: '编辑入库单', noCache: true, roles: ['dfAdmin','dfZongjian'], activeMenu: '/rukudan' },
          hidden: true
        },
        {
          path: '/chukudan',
          component: () => import('@/views/consumables/chukudan/index'),
          name: 'Chukudan',
          meta: { title: '出库单', noCache: true, roles: ['dfAdmin','dfZongjian'] },
          hidden: true
        },
        {
          path: '/writechukudan',
          component: () => import('@/views/consumables/chukudan/writechukudan'),
          name: 'Writechukudan',
          meta: { title: '编辑出库单', noCache: true, roles: ['dfAdmin','dfZongjian'], activeMenu: '/chukudan'  },
          hidden: true
        },
        {
          path: '/haocaifenlei',
          component: () => import('@/views/consumables/haocaifenlei/index'),
          name: 'Haocaifenlei',
          meta: { title: '耗材分类', noCache: true, roles: ['dfAdmin','dfZongjian'] }
        },
        {
          path: '/haocaizichan',
          component: () => import('@/views/consumables/haocaizichan/index'),
          name: 'Haocaizichan',
          meta: { title: '耗材资产', noCache: true, roles: ['dfAdmin','dfZongjian'] }
        },
        {
          path: '/writehaocaizichan',
          component: () => import('@/views/consumables/haocaizichan/writehaocaizichan'),
          name: 'Writehaocaizichan',
          meta: { title: '编辑耗材资产', noCache: true, roles: ['dfAdmin','dfZongjian'], activeMenu: '/haocaizichan'  },
          hidden: true
        },
      ]
    },
    {
      path: '/fenleibaobiao',
      component: () => import('@/views/assetmanage/fenleibaobiao/index'),
      alwaysShow: true,
      meta: {title: '分类报表',noCache: true,roles: ['dfAdmin','dfZongjian']},
      children:[{
        path: '/fenleishiyong',
        component: () => import('@/views/assetmanage/fenleibaobiao/fenleishiyong/index'),
        name: 'Fenleishiyong',
        meta: {title: '仓库使用汇总',noCache: true,roles: ['dfAdmin','dfZongjian'], activeMenu: '/fenleibaobiao'},
      },{
        path: '/gebumenshiyong',
        component: () => import('@/views/assetmanage/fenleibaobiao/gebumenshiyong/index'),
        name: 'Gebumenshiyong',
        meta: {title: '各部门分类使用',noCache: true,roles: ['dfAdmin','dfZongjian'], activeMenu: '/fenleibaobiao'},
      },{
        path: '/gbmzichanshiyong',
        component: () => import('@/views/assetmanage/fenleibaobiao/gbmzichanshiyong/index'),
        name: 'Gbmzichanshiyong',
        meta: {title: '各部门资产使用',noCache: true,roles: ['dfAdmin','dfZongjian'], activeMenu: '/fenleibaobiao'},
      }]
    }
  ]
}

const consumables = {
  path: '/consumables',
  component: Layout,
  meta: { title: '耗材管理', icon: 'haocai', noCache: true, roles: ['admin', 'editor'] },
  children: [
    {
      path: '/rukudan',
      component: () => import('@/views/consumables/rukudan/index'),
      name: 'Rukudan',
      meta: { title: '入库单', noCache: true, roles: ['admin', 'editor'] }
    },
    {
      path: '/writerukudan',
      component: () => import('@/views/consumables/rukudan/writerukudan'),
      name: 'Writerukudan',
      meta: { title: '编辑入库单', noCache: true, roles: ['admin', 'editor'], activeMenu: '/rukudan' },
      hidden: true
    },
    {
      path: '/chukudan',
      component: () => import('@/views/consumables/chukudan/index'),
      name: 'Chukudan',
      meta: { title: '出库单', noCache: true, roles: ['admin', 'editor'] }
    },
    {
      path: '/writechukudan',
      component: () => import('@/views/consumables/chukudan/writechukudan'),
      name: 'Writechukudan',
      meta: { title: '编辑出库单', noCache: true, roles: ['admin', 'editor'], activeMenu: '/chukudan'  },
      hidden: true
    },
  ]
}

export { assetmanage,consumables } 